

<!DOCTYPE html>
<html lang="zh-CN" data-default-color-scheme=auto>



<head>
  <meta charset="UTF-8">
  <link rel="apple-touch-icon" sizes="76x76" href="/img/fluid.png">
  <link rel="icon" href="/img/fluid.png">
  <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=5.0, shrink-to-fit=no">
  <meta http-equiv="x-ua-compatible" content="ie=edge">
  
  <meta name="theme-color" content="#2f4154">
  <meta name="author" content="micahyin">
  <meta name="keywords" content="">
  
    <meta name="description" content="本文主要介绍如何使用Hexo编写博客，并使用gitee pages发布博客">
<meta property="og:type" content="article">
<meta property="og:title" content="如何使用Hexo编写博客？">
<meta property="og:url" content="http://example.com/2024/03/16/%E5%A6%82%E4%BD%95%E4%BD%BF%E7%94%A8Hexo%E7%BC%96%E5%86%99%E5%8D%9A%E5%AE%A2%EF%BC%9F/index.html">
<meta property="og:site_name" content="subit">
<meta property="og:description" content="本文主要介绍如何使用Hexo编写博客，并使用gitee pages发布博客">
<meta property="og:locale" content="zh_CN">
<meta property="og:image" content="http://example.com/2024/03/16/%E5%A6%82%E4%BD%95%E4%BD%BF%E7%94%A8Hexo%E7%BC%96%E5%86%99%E5%8D%9A%E5%AE%A2%EF%BC%9F/infinity-1326108.jpg">
<meta property="article:published_time" content="2024-03-16T05:47:39.000Z">
<meta property="article:modified_time" content="2024-03-16T09:36:09.494Z">
<meta property="article:author" content="micahyin">
<meta property="article:tag" content="博客">
<meta name="twitter:card" content="summary_large_image">
<meta name="twitter:image" content="http://example.com/2024/03/16/%E5%A6%82%E4%BD%95%E4%BD%BF%E7%94%A8Hexo%E7%BC%96%E5%86%99%E5%8D%9A%E5%AE%A2%EF%BC%9F/infinity-1326108.jpg">
  
  
  
  <title>如何使用Hexo编写博客？ - subit</title>

  <link  rel="stylesheet" href="https://lib.baomitu.com/twitter-bootstrap/4.6.1/css/bootstrap.min.css" />



  <link  rel="stylesheet" href="https://lib.baomitu.com/github-markdown-css/4.0.0/github-markdown.min.css" />

  <link  rel="stylesheet" href="https://lib.baomitu.com/hint.css/2.7.0/hint.min.css" />

  <link  rel="stylesheet" href="https://lib.baomitu.com/fancybox/3.5.7/jquery.fancybox.min.css" />



<!-- 主题依赖的图标库，不要自行修改 -->
<!-- Do not modify the link that theme dependent icons -->

<link rel="stylesheet" href="//at.alicdn.com/t/font_1749284_hj8rtnfg7um.css">



<link rel="stylesheet" href="//at.alicdn.com/t/font_1736178_lbnruvf0jn.css">


<link  rel="stylesheet" href="/css/main.css" />


  <link id="highlight-css" rel="stylesheet" href="/css/highlight.css" />
  
    <link id="highlight-css-dark" rel="stylesheet" href="/css/highlight-dark.css" />
  




  <script id="fluid-configs">
    var Fluid = window.Fluid || {};
    Fluid.ctx = Object.assign({}, Fluid.ctx)
    var CONFIG = {"hostname":"example.com","root":"/","version":"1.9.5-a","typing":{"enable":true,"typeSpeed":70,"cursorChar":"_","loop":false,"scope":[]},"anchorjs":{"enable":true,"element":"h1,h2,h3,h4,h5,h6","placement":"left","visible":"hover","icon":""},"progressbar":{"enable":true,"height_px":3,"color":"#29d","options":{"showSpinner":false,"trickleSpeed":100}},"code_language":{"enable":true,"default":"TEXT"},"copy_btn":true,"image_caption":{"enable":true},"image_zoom":{"enable":true,"img_url_replace":["",""]},"toc":{"enable":true,"placement":"right","headingSelector":"h1,h2,h3,h4,h5,h6","collapseDepth":0},"lazyload":{"enable":true,"loading_img":"/img/loading.gif","onlypost":false,"offset_factor":2},"web_analytics":{"enable":false,"follow_dnt":true,"baidu":null,"google":{"measurement_id":null},"tencent":{"sid":null,"cid":null},"woyaola":null,"cnzz":null,"leancloud":{"app_id":null,"app_key":null,"server_url":null,"path":"window.location.pathname","ignore_local":false}},"search_path":"/local-search.xml","include_content_in_search":true};

    if (CONFIG.web_analytics.follow_dnt) {
      var dntVal = navigator.doNotTrack || window.doNotTrack || navigator.msDoNotTrack;
      Fluid.ctx.dnt = dntVal && (dntVal.startsWith('1') || dntVal.startsWith('yes') || dntVal.startsWith('on'));
    }
  </script>
  <script  src="/js/utils.js" ></script>
  <script  src="/js/color-schema.js" ></script>
  


  
<meta name="generator" content="Hexo 6.3.0"></head>


<body>
  

  <header>
    

<div class="header-inner" style="height: 70vh;">
  <nav id="navbar" class="navbar fixed-top  navbar-expand-lg navbar-dark scrolling-navbar">
  <div class="container">
    <a class="navbar-brand" href="/">
      <strong>subit</strong>
    </a>

    <button id="navbar-toggler-btn" class="navbar-toggler" type="button" data-toggle="collapse"
            data-target="#navbarSupportedContent"
            aria-controls="navbarSupportedContent" aria-expanded="false" aria-label="Toggle navigation">
      <div class="animated-icon"><span></span><span></span><span></span></div>
    </button>

    <!-- Collapsible content -->
    <div class="collapse navbar-collapse" id="navbarSupportedContent">
      <ul class="navbar-nav ml-auto text-center">
        
          
          
          
          
            <li class="nav-item">
              <a class="nav-link" href="/">
                <i class="iconfont icon-home-fill"></i>
                <span>首页</span>
              </a>
            </li>
          
        
          
          
          
          
            <li class="nav-item">
              <a class="nav-link" href="/archives/">
                <i class="iconfont icon-archive-fill"></i>
                <span>归档</span>
              </a>
            </li>
          
        
          
          
          
          
            <li class="nav-item">
              <a class="nav-link" href="/categories/">
                <i class="iconfont icon-category-fill"></i>
                <span>分类</span>
              </a>
            </li>
          
        
          
          
          
          
            <li class="nav-item">
              <a class="nav-link" href="/tags/">
                <i class="iconfont icon-tags-fill"></i>
                <span>标签</span>
              </a>
            </li>
          
        
          
          
          
          
            <li class="nav-item">
              <a class="nav-link" href="/about/">
                <i class="iconfont icon-user-fill"></i>
                <span>关于</span>
              </a>
            </li>
          
        
        
          <li class="nav-item" id="search-btn">
            <a class="nav-link" target="_self" href="javascript:;" data-toggle="modal" data-target="#modalSearch" aria-label="Search">
              <i class="iconfont icon-search"></i>
            </a>
          </li>
          
        
        
          <li class="nav-item" id="color-toggle-btn">
            <a class="nav-link" target="_self" href="javascript:;" aria-label="Color Toggle">
              <i class="iconfont icon-dark" id="color-toggle-icon"></i>
            </a>
          </li>
        
      </ul>
    </div>
  </div>
</nav>

  

<div id="banner" class="banner" parallax=true
     style="background: url('/img/default.png') no-repeat center center; background-size: cover;">
  <div class="full-bg-img">
    <div class="mask flex-center" style="background-color: rgba(0, 0, 0, 0.3)">
      <div class="banner-text text-center fade-in-up">
        <div class="h2">
          
            <span id="subtitle" data-typed-text="如何使用Hexo编写博客？"></span>
          
        </div>

        
          
  <div class="mt-3">
    
    
      <span class="post-meta">
        <i class="iconfont icon-date-fill" aria-hidden="true"></i>
        <time datetime="2024-03-16 13:47" pubdate>
          2024年3月16日 下午
        </time>
      </span>
    
  </div>

  <div class="mt-1">
    
      <span class="post-meta mr-2">
        <i class="iconfont icon-chart"></i>
        
          2.6k 字
        
      </span>
    

    
      <span class="post-meta mr-2">
        <i class="iconfont icon-clock-fill"></i>
        
        
        
          22 分钟
        
      </span>
    

    
    
  </div>


        
      </div>

      
    </div>
  </div>
</div>

</div>

  </header>

  <main>
    
      

<div class="container-fluid nopadding-x">
  <div class="row nomargin-x">
    <div class="side-col d-none d-lg-block col-lg-2">
      

    </div>

    <div class="col-lg-8 nopadding-x-md">
      <div class="container nopadding-x-md" id="board-ctn">
        <div id="board">
          <article class="post-content mx-auto">
            <h1 id="seo-header">如何使用Hexo编写博客？</h1>
            
            
              <div class="markdown-body">
                
                <h1 id="如何使用Hexo编写博客？"><a href="#如何使用Hexo编写博客？" class="headerlink" title="如何使用Hexo编写博客？"></a>如何使用Hexo编写博客？</h1><p><img src="/2024/03/16/%E5%A6%82%E4%BD%95%E4%BD%BF%E7%94%A8Hexo%E7%BC%96%E5%86%99%E5%8D%9A%E5%AE%A2%EF%BC%9F/infinity-1326108.jpg" srcset="/img/loading.gif" lazyload></p>
<h2 id="一、安装Hexo"><a href="#一、安装Hexo" class="headerlink" title="一、安装Hexo"></a>一、安装Hexo</h2><p>Hexo是一个快速、简洁且高效的博客框架，配合 Material Design 风格的主题Fluid，可以很方便快捷的创建一个属于自己的博客。使用gitee pages服务，可以轻松的将博客部署到网络访问。</p>
<h3 id="1-1、环境搭建"><a href="#1-1、环境搭建" class="headerlink" title="1.1、环境搭建"></a>1.1、环境搭建</h3><h4 id="1-1-1、安装node-js"><a href="#1-1-1、安装node-js" class="headerlink" title="1.1.1、安装node.js"></a>1.1.1、安装node.js</h4><p>下载node.js，下载地址为：<a target="_blank" rel="noopener" href="http://nodejs.cn/download/">http://nodejs.cn/download/</a></p>
<figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br></pre></td><td class="code"><pre><code class="hljs bash"><span class="hljs-comment"># 确认node.js安装成功：运行下面两个命令打印版本号即可</span><br>node -v<br>npm  -v<br><br><span class="hljs-comment"># 安装 Node.js 淘宝镜像加速器 （cnpm）</span><br>npm install -g cnpm --registry=https://registry.npm.taobao.org<br><br><span class="hljs-comment"># 修改 node 类库默认安装位置</span><br><span class="hljs-comment"># 默认是在 C:\Users\lingStudy\AppData\Roaming\npm</span><br><br>npm config <span class="hljs-built_in">set</span> prefix <span class="hljs-string">&quot;D:\nodejs安装路径\node_global&quot;</span><br>npm config <span class="hljs-built_in">set</span> cache <span class="hljs-string">&quot;D:\nodejs安装路径\node_cache&quot;</span><br><span class="hljs-comment"># 查看修改是否成功</span><br>npm root -g<br><span class="hljs-comment"># 然后把D:\install\node\node_global配置到环境变量的 PATH 下即可</span><br><br></code></pre></td></tr></table></figure>



<h4 id="1-1-2、安装Git"><a href="#1-1-2、安装Git" class="headerlink" title="1.1.2、安装Git"></a>1.1.2、安装Git</h4><p>下载安装Git，下载地址是：<a target="_blank" rel="noopener" href="https://git-scm.com/download">https://git-scm.com/download</a></p>
<figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br></pre></td><td class="code"><pre><code class="hljs bash"><span class="hljs-comment"># Git一些重要配置</span><br>git config --global user.name <span class="hljs-string">&quot;lxxxxdy&quot;</span>  <span class="hljs-comment">#码云用户名</span><br>git config --global user.email <span class="hljs-string">&quot;xxx83@qq.com&quot;</span>   <span class="hljs-comment">#邮箱</span><br><br><span class="hljs-comment"># 生成SSH公钥并添加到码云，实现免密码登录</span><br><span class="hljs-comment"># 1、生成公钥</span><br>ssh-keygen -t rsa<br><span class="hljs-comment"># 2、进入 C:\Users\主机名\.ssh 目录，把 id_rsa.pub 里面的信息复制到码云的 SSH公钥 中即可</span><br><br></code></pre></td></tr></table></figure>



<h4 id="1-1-3、安装Hexo"><a href="#1-1-3、安装Hexo" class="headerlink" title="1.1.3、安装Hexo"></a>1.1.3、安装Hexo</h4><p>Hexo官网：<a target="_blank" rel="noopener" href="https://hexo.io/zh-cn/">https://hexo.io/zh-cn/</a></p>
<figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br></pre></td><td class="code"><pre><code class="hljs bash"><span class="hljs-comment"># 全局安装</span><br>npm install hexo-cli -g<br><span class="hljs-comment"># 查看hexo版本</span><br>hexo -v<br></code></pre></td></tr></table></figure>

<p>创建本地博客站点</p>
<figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br></pre></td><td class="code"><pre><code class="hljs bash"><span class="hljs-comment"># 初始化一个项目，hexoblog 是项目名</span><br>hexo init  hexoblog<br></code></pre></td></tr></table></figure>

<p>启动博客</p>
<figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br></pre></td><td class="code"><pre><code class="hljs bash"><span class="hljs-comment"># 1、进入hexoblog项目目录</span><br><span class="hljs-built_in">cd</span> hexoblog<br><span class="hljs-comment">#/2、安装 hexoblog 项目的依赖包</span><br>npm install<br><span class="hljs-comment">#/3、启动 hexoblog 项目服务</span><br>hexo server<br></code></pre></td></tr></table></figure>

<h4 id="1-1-4Hexo目录介绍"><a href="#1-1-4Hexo目录介绍" class="headerlink" title="1.1.4Hexo目录介绍"></a>1.1.4Hexo目录介绍</h4><figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br></pre></td><td class="code"><pre><code class="hljs bash">.<br>├── .deploy       <span class="hljs-comment"># 需要部署的文件</span><br>├── node_modules  <span class="hljs-comment"># 项目所有的依赖包和插件</span><br>├── public        <span class="hljs-comment"># 生成的静态网页文件</span><br>├── scaffolds     <span class="hljs-comment"># 文章模板</span><br>├── <span class="hljs-built_in">source</span>        <span class="hljs-comment"># 博客正文和其他源文件等都应该放在这里</span><br>|   ├── _drafts   <span class="hljs-comment"># 草稿</span><br>|   └── _posts    <span class="hljs-comment"># 文章</span><br>├── themes        <span class="hljs-comment"># 主题</span><br>├── _config.yml   <span class="hljs-comment"># 全局配置文件</span><br>└── package.json  <span class="hljs-comment"># 项目依赖信息</span><br></code></pre></td></tr></table></figure>

<h3 id="1-2、如何保存图片"><a href="#1-2、如何保存图片" class="headerlink" title="1.2、如何保存图片"></a>1.2、如何保存图片</h3><p>使用Hexo有多种方式可以保存图片，如保存在全局资源文件夹、保存在文章资源文件夹和保存在在线图床。这其中我认为最便捷的方式，就是保存在文章的资源文件夹。</p>
<p>修改hexo文件夹中的**_config.yml**文件，如下：</p>
<figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br></pre></td><td class="code"><pre><code class="hljs bash">post_asset_folder: <span class="hljs-literal">true</span><br>marked:<br>  prependRoot: <span class="hljs-literal">true</span><br>  postAsset: <span class="hljs-literal">true</span><br></code></pre></td></tr></table></figure>

<p>在使用命令创建新的文章时，Hexo会自动的创建一个同名的文件夹，用来保存文章的图片资源。</p>
<p>文章最开始的图片，便是以这种方式插入的。注意：图片的路径，<strong>直接写图片名即可</strong>（在Typora下展示不正常），Hexo在编译时，会将图片放到博客网页的同一路径下。</p>
<h2 id="二、本地编写博客"><a href="#二、本地编写博客" class="headerlink" title="二、本地编写博客"></a>二、本地编写博客</h2><h3 id="2-1、创建新博客"><a href="#2-1、创建新博客" class="headerlink" title="2.1、创建新博客"></a>2.1、创建新博客</h3><p>使用命令可以创建一个新博客，会自动的在同目录创建一个用来保存图片资源的文件夹。</p>
<figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br></pre></td><td class="code"><pre><code class="hljs bash"><span class="hljs-comment"># 新建一篇名为 第一篇Hexo blog文章 的文章</span><br>hexo new <span class="hljs-string">&quot;第一篇Hexo blog文章&quot;</span><br></code></pre></td></tr></table></figure>

<p>也可以使用手动的方式进行创建。直接在source&#x2F;_posts目录创建md文件和资源文件夹，但是需要注意，在md文件的头部，必须填上如下内容:</p>
<figure class="highlight subunit"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br></pre></td><td class="code"><pre><code class="hljs subunit">title: 博客名<br>date: 创建时间<br><span class="hljs-keyword">tags:</span> 标签<br>categories: 分类<br>excerpt: 本篇博客的摘要<br></code></pre></td></tr></table></figure>

<h2 id="三、将博客部署到码云"><a href="#三、将博客部署到码云" class="headerlink" title="三、将博客部署到码云"></a>三、将博客部署到码云</h2><h3 id="3-1、上传远程仓库"><a href="#3-1、上传远程仓库" class="headerlink" title="3.1、上传远程仓库"></a>3.1、上传远程仓库</h3><h4 id="3-1-1、新建Gitee仓库"><a href="#3-1-1、新建Gitee仓库" class="headerlink" title="3.1.1、新建Gitee仓库"></a>3.1.1、新建Gitee仓库</h4><p>在gitee上新建一个与gitee用户名相同的仓库名，同时开通gitee pages服务，并复制仓库URL地址。</p>
<h4 id="3-1-2、配置Hexo"><a href="#3-1-2、配置Hexo" class="headerlink" title="3.1.2、配置Hexo"></a>3.1.2、配置Hexo</h4><p>在项目的根目录下，安装git部署插件。</p>
<figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br></pre></td><td class="code"><pre><code class="hljs bash"><span class="hljs-comment"># 之后就可以使用 hexo deploy（或简写 hexo d）将项目部署到gitee远程仓库</span><br>npm install hexo-deployer-git --save<br></code></pre></td></tr></table></figure>

<p>修改项目配置文件：**_config.yml**，在最下面，修改如下内容</p>
<figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br></pre></td><td class="code"><pre><code class="hljs bash"><span class="hljs-comment"># Deployment</span><br><span class="hljs-comment">## Docs: https://hexo.io/docs/deployment.html</span><br>deploy:<br>  <span class="hljs-built_in">type</span>: git<br>  repo: 仓库URL地址<br>  branch: master<br></code></pre></td></tr></table></figure>

<p>使用如下命令，将项目push到gitee</p>
<figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br></pre></td><td class="code"><pre><code class="hljs bash"><span class="hljs-comment"># 生成静态网站文件</span><br>hexo g  <br><span class="hljs-comment"># 上传到远程仓库</span><br>hexo d  <br><br><span class="hljs-comment"># 1、清除 hexo 的缓存</span><br>hexo clean<br><span class="hljs-comment"># 2、采用一键部署</span><br>hexo g --d<br></code></pre></td></tr></table></figure>

<h3 id="3-2、发布到码云"><a href="#3-2、发布到码云" class="headerlink" title="3.2、发布到码云"></a>3.2、发布到码云</h3><p>项目代码push成功之后，需要到gitee中，进入到pages服务，点击更新将网页进行更新。大约几分钟之后无缓存刷新页面，就能看到更新完成的页面。</p>
<h2 id="四、修改博客主题等个性化配置"><a href="#四、修改博客主题等个性化配置" class="headerlink" title="四、修改博客主题等个性化配置"></a>四、修改博客主题等个性化配置</h2><h3 id="4-1、官网参考文档"><a href="#4-1、官网参考文档" class="headerlink" title="4.1、官网参考文档"></a>4.1、官网参考文档</h3><p>Fluid主题有很多可以个性化的配置，详见用户手册：<a target="_blank" rel="noopener" href="https://hexo.fluid-dev.com/docs/">Hexo Fluid 用户手册 (fluid-dev.com)</a></p>
<h3 id="4-2、主题修改"><a href="#4-2、主题修改" class="headerlink" title="4.2、主题修改"></a>4.2、主题修改</h3><p>Hexo博客有很多其他的主题可以使用，Hexo主题官网：<a target="_blank" rel="noopener" href="https://hexo.io/themes/">Themes | Hexo</a></p>
<h2 id="五、参考资料"><a href="#五、参考资料" class="headerlink" title="五、参考资料"></a>五、参考资料</h2><p>1、<a target="_blank" rel="noopener" href="https://blog.csdn.net/weixin_42365530/article/details/107750003">Hexo+gitee：30分钟搭建一个自己的个人博客网站 欢迎友链呀＜(▰˘◡˘▰)_hexo和halo-CSDN博客</a></p>
<p>2、<a target="_blank" rel="noopener" href="https://blog.csdn.net/2301_77285173/article/details/130189857">在hexo博客中插入图片的方法_hexo 博客添加图片-CSDN博客</a></p>

                
              </div>
            
            <hr/>
            <div>
              <div class="post-metas my-3">
  
    <div class="post-meta mr-3 d-flex align-items-center">
      <i class="iconfont icon-category"></i>
      

<span class="category-chains">
  
  
    
      <span class="category-chain">
        
  <a href="/categories/%E5%B7%A5%E5%85%B7%E6%96%B9%E6%B3%95/" class="category-chain-item">工具方法</a>
  
  

      </span>
    
  
</span>

    </div>
  
  
    <div class="post-meta">
      <i class="iconfont icon-tags"></i>
      
        <a href="/tags/%E5%8D%9A%E5%AE%A2/" class="print-no-link">#博客</a>
      
    </div>
  
</div>


              
  

  <div class="license-box my-3">
    <div class="license-title">
      <div>如何使用Hexo编写博客？</div>
      <div>http://example.com/2024/03/16/如何使用Hexo编写博客？/</div>
    </div>
    <div class="license-meta">
      
        <div class="license-meta-item">
          <div>作者</div>
          <div>micahyin</div>
        </div>
      
      
        <div class="license-meta-item license-meta-date">
          <div>发布于</div>
          <div>2024年3月16日</div>
        </div>
      
      
      
        <div class="license-meta-item">
          <div>许可协议</div>
          <div>
            
              
              
                <a class="print-no-link" target="_blank" href="https://creativecommons.org/licenses/by/4.0/">
                  <span class="hint--top hint--rounded" aria-label="BY - 署名">
                    <i class="iconfont icon-by"></i>
                  </span>
                </a>
              
            
          </div>
        </div>
      
    </div>
    <div class="license-icon iconfont"></div>
  </div>



              
                <div class="post-prevnext my-3">
                  <article class="post-prev col-6">
                    
                    
                  </article>
                  <article class="post-next col-6">
                    
                    
                  </article>
                </div>
              
            </div>

            
          </article>
        </div>
      </div>
    </div>

    <div class="side-col d-none d-lg-block col-lg-2">
      
  <aside class="sidebar" style="margin-left: -1rem">
    <div id="toc">
  <p class="toc-header">
    <i class="iconfont icon-list"></i>
    <span>目录</span>
  </p>
  <div class="toc-body" id="toc-body"></div>
</div>



  </aside>


    </div>
  </div>
</div>





  



  



  



  



  







    

    
      <a id="scroll-top-button" aria-label="TOP" href="#" role="button">
        <i class="iconfont icon-arrowup" aria-hidden="true"></i>
      </a>
    

    
      <div class="modal fade" id="modalSearch" tabindex="-1" role="dialog" aria-labelledby="ModalLabel"
     aria-hidden="true">
  <div class="modal-dialog modal-dialog-scrollable modal-lg" role="document">
    <div class="modal-content">
      <div class="modal-header text-center">
        <h4 class="modal-title w-100 font-weight-bold">搜索</h4>
        <button type="button" id="local-search-close" class="close" data-dismiss="modal" aria-label="Close">
          <span aria-hidden="true">&times;</span>
        </button>
      </div>
      <div class="modal-body mx-3">
        <div class="md-form mb-5">
          <input type="text" id="local-search-input" class="form-control validate">
          <label data-error="x" data-success="v" for="local-search-input">关键词</label>
        </div>
        <div class="list-group" id="local-search-result"></div>
      </div>
    </div>
  </div>
</div>

    

    
  </main>

  <footer>
    <div class="footer-inner">
  
    <div class="footer-content">
       <a href="https://hexo.io" target="_blank" rel="nofollow noopener"><span>Hexo</span></a> <i class="iconfont icon-love"></i> <a href="https://github.com/fluid-dev/hexo-theme-fluid" target="_blank" rel="nofollow noopener"><span>Fluid</span></a> 
    </div>
  
  
  
  
</div>

  </footer>

  <!-- Scripts -->
  
  <script  src="https://lib.baomitu.com/nprogress/0.2.0/nprogress.min.js" ></script>
  <link  rel="stylesheet" href="https://lib.baomitu.com/nprogress/0.2.0/nprogress.min.css" />

  <script>
    NProgress.configure({"showSpinner":false,"trickleSpeed":100})
    NProgress.start()
    window.addEventListener('load', function() {
      NProgress.done();
    })
  </script>


<script  src="https://lib.baomitu.com/jquery/3.6.4/jquery.min.js" ></script>
<script  src="https://lib.baomitu.com/twitter-bootstrap/4.6.1/js/bootstrap.min.js" ></script>
<script  src="/js/events.js" ></script>
<script  src="/js/plugins.js" ></script>


  <script  src="https://lib.baomitu.com/typed.js/2.0.12/typed.min.js" ></script>
  <script>
    (function (window, document) {
      var typing = Fluid.plugins.typing;
      var subtitle = document.getElementById('subtitle');
      if (!subtitle || !typing) {
        return;
      }
      var text = subtitle.getAttribute('data-typed-text');
      
        typing(text);
      
    })(window, document);
  </script>




  
    <script  src="/js/img-lazyload.js" ></script>
  




  
<script>
  Fluid.utils.createScript('https://lib.baomitu.com/tocbot/4.20.1/tocbot.min.js', function() {
    var toc = jQuery('#toc');
    if (toc.length === 0 || !window.tocbot) { return; }
    var boardCtn = jQuery('#board-ctn');
    var boardTop = boardCtn.offset().top;

    window.tocbot.init(Object.assign({
      tocSelector     : '#toc-body',
      contentSelector : '.markdown-body',
      linkClass       : 'tocbot-link',
      activeLinkClass : 'tocbot-active-link',
      listClass       : 'tocbot-list',
      isCollapsedClass: 'tocbot-is-collapsed',
      collapsibleClass: 'tocbot-is-collapsible',
      scrollSmooth    : true,
      includeTitleTags: true,
      headingsOffset  : -boardTop,
    }, CONFIG.toc));
    if (toc.find('.toc-list-item').length > 0) {
      toc.css('visibility', 'visible');
    }

    Fluid.events.registerRefreshCallback(function() {
      if ('tocbot' in window) {
        tocbot.refresh();
        var toc = jQuery('#toc');
        if (toc.length === 0 || !tocbot) {
          return;
        }
        if (toc.find('.toc-list-item').length > 0) {
          toc.css('visibility', 'visible');
        }
      }
    });
  });
</script>


  <script src=https://lib.baomitu.com/clipboard.js/2.0.11/clipboard.min.js></script>

  <script>Fluid.plugins.codeWidget();</script>


  
<script>
  Fluid.utils.createScript('https://lib.baomitu.com/anchor-js/4.3.1/anchor.min.js', function() {
    window.anchors.options = {
      placement: CONFIG.anchorjs.placement,
      visible  : CONFIG.anchorjs.visible
    };
    if (CONFIG.anchorjs.icon) {
      window.anchors.options.icon = CONFIG.anchorjs.icon;
    }
    var el = (CONFIG.anchorjs.element || 'h1,h2,h3,h4,h5,h6').split(',');
    var res = [];
    for (var item of el) {
      res.push('.markdown-body > ' + item.trim());
    }
    if (CONFIG.anchorjs.placement === 'left') {
      window.anchors.options.class = 'anchorjs-link-left';
    }
    window.anchors.add(res.join(', '));

    Fluid.events.registerRefreshCallback(function() {
      if ('anchors' in window) {
        anchors.removeAll();
        var el = (CONFIG.anchorjs.element || 'h1,h2,h3,h4,h5,h6').split(',');
        var res = [];
        for (var item of el) {
          res.push('.markdown-body > ' + item.trim());
        }
        if (CONFIG.anchorjs.placement === 'left') {
          anchors.options.class = 'anchorjs-link-left';
        }
        anchors.add(res.join(', '));
      }
    });
  });
</script>


  
<script>
  Fluid.utils.createScript('https://lib.baomitu.com/fancybox/3.5.7/jquery.fancybox.min.js', function() {
    Fluid.plugins.fancyBox();
  });
</script>


  <script>Fluid.plugins.imageCaption();</script>

  <script  src="/js/local-search.js" ></script>





<!-- 主题的启动项，将它保持在最底部 -->
<!-- the boot of the theme, keep it at the bottom -->
<script  src="/js/boot.js" ></script>


  

  <noscript>
    <div class="noscript-warning">博客在允许 JavaScript 运行的环境下浏览效果更佳</div>
  </noscript>
</body>
</html>
